<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sq="http://www.w3.org/1999/html">
<head>
  <th:block th:include="include :: header"/>
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
  <div class="row">
    <div class="col-sm-12">
      <div class="ibox float-e-margins">
        <div class="ibox-title">
          <h5 th:text="${title}"></h5>
          <div class="ibox-tools">
            <a class="collapse-link">
              <i class="fa fa-chevron-up"></i>
            </a>
          </div>
        </div>
        <div class="ibox-content">
          <form class="form-horizontal m-t" id="editFrom" method="post">
            <div class="form-group">
              <label class="col-sm-3 control-label">账号：</label>
              <div class="col-sm-8">
                <input type="hidden" id="id" name="id" th:value="${user.id}">
                <input id="username" name="username" minlength="2" th:disabled="${user.id}" th:value="${user.username}"
                       type="text" maxlength="50" class="form-control" required="" aria-required="true">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">用户名：</label>
              <div class="col-sm-8">
                <input id="surname" name="surname" minlength="1" th:value="${user.surname}" type="text"
                       maxlength="50" class="form-control" required="" aria-required="true">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">状态：</label>
              <div class="col-sm-8">
                <sq:select id="status" name="status" th:value="${user.status}" dicCode="1001"
                           pleaseChoose="用户状态"></sq:select>
              </div>
            </div>
            <div class="form-group">
              <div class="col-sm-4 col-sm-offset-3">
                <button class="btn btn-primary" type="button" onclick="saveData()">
                  提交
                </button>
                <button class="btn btn-outline btn-default" type="button" onclick="back()">
                  返回
                </button>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    const requestPath = parent.api.sys.user
</script>
</body>

</html>